<% if @webserver == 'nginx' -%>
    location /<%= @name %> {
        location /<%= @name %>/config.js {
            alias <%= @path_config_js_real %>;
        }
        alias /usr/share/kibana;
        allow 127.0.0.1/32;
        allow ::1;
<% @allow_from.each do |single_ip| -%>
        allow <%= single_ip %>;
<% end -%>
        deny  all;
    }
<% elsif @webserver == 'apache' -%>
Alias /<%= @name %>/config.js <%= @path_config_js_real %>
Alias /<%= @name %> /usr/share/kibana
<Location /<%= @name %>>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
<% @allow_from.each do |single_ip| -%>
    Allow from <%= single_ip %>
<% end -%>
</Location>

<% end -%>
